home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / MorphOS / Epic4_mos / share / epic / help / 5_programming / hook < prev    next >
Encoding:
Text File  |  2002-10-28  |  859 b   |  29 lines

  1. Synopsis:
  2.    hook <anything>
  3.  
  4. Description:
  5.    HOOK is used for one thing only; to activate a HOOK hook.  Don't worry
  6.    if that didn't make much sense.  The client has a mechanism by which
  7.    an arbitrary hook may be defined that can be hooked at any time by
  8.    the HOOK command.  The hook is created just like any other named
  9.    hook, except only the HOOK command may trigger it.
  10.  
  11. Examples:
  12.    This script will echo a line every 10 seconds:
  13.       on ^hook "foo" {
  14.          timer 10 {
  15.             echo This line is repeated every 10 seconds
  16.             hook foo
  17.          }
  18.       }
  19.       hook foo
  20.  
  21. See Also:
  22.    on(5) hook
  23.  
  24. Other Notes:
  25.    The same functionality of HOOK can be obtained with normal aliases.
  26.    However, use of HOOK is preferred as it avoids the need for recursive
  27.    aliases (which have been known to cause trouble).
  28.  
  29.